#define  _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
struct student {
	int num;
	char str[20];
};

int main()
{
	struct student Student = { 10,"asd" };
	FILE* pf = fopen(".\dat.txt", "w");
	if (pf = NULL) {
		perror("fopen");
		return ;
	}
	fprintf(pf, "%d %s", Student.num, Student.str);
	fclose(pf);
	pf = NULL;
	return 0;
}